<?php echo form_tag('@admin?module=comment&action=save', array(
  'id'        => 'sf_admin_edit_form',
  'name'      => 'sf_admin_edit_form',
  'multipart' => true,
)) ?>

<?php echo object_input_hidden_tag($comment, 'getId') ?>

<fieldset id="sf_fieldset_none" class="">

<div class="form-row">
  <?php echo label_for('comment[user]', __($labels['comment{user}']), 'class="required" ') ?>
  <div class="content">
  <?php include_partial('comment/user', array('comment' => $comment)); ?>
  </div>
</div>

<div class="form-row">
  <?php echo label_for('comment[name]', __($labels['comment{name}']), 'class="required" ') ?>
  <div class="content<?php if ($sf_request->hasError('comment{name}')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('comment{name}')): ?>
    <?php echo form_error('comment{name}', array('class' => 'form-error-msg')) ?>
  <?php endif; ?>

  <?php $value = object_input_tag($comment, 'getName', array (
  'size' => 50,
  'control_name' => 'comment[name]',
)); echo $value ? $value : '&nbsp;' ?>
    </div>
</div>

<div class="form-row">
  <?php echo label_for('comment[url]', __($labels['comment{url}']), 'class="required" ') ?>
  <div class="content<?php if ($sf_request->hasError('comment{url}')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('comment{url}')): ?>
    <?php echo form_error('comment{url}', array('class' => 'form-error-msg')) ?>
  <?php endif; ?>

  <?php $value = object_input_tag($comment, 'getUrl', array (
  'size' => 80,
  'control_name' => 'comment[url]',
)); echo $value ? $value : '&nbsp;' ?>
    </div>
</div>

<div class="form-row">
  <?php echo label_for('comment[content]', __($labels['comment{content}']), 'class="required" ') ?>
  <div class="content<?php if ($sf_request->hasError('comment{content}')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('comment{content}')): ?>
    <?php echo form_error('comment{content}', array('class' => 'form-error-msg')) ?>
  <?php endif; ?>

  <?php $value = object_textarea_tag($comment, 'getContent', array (
  'size' => '70x7',
  'control_name' => 'comment[content]',
)); echo $value ? $value : '&nbsp;' ?>
    </div>
</div>

<div class="form-row">
  <?php echo label_for('comment[approved]', __($labels['comment{approved}']), 'class="required" ') ?>
  <div class="content<?php if ($sf_request->hasError('comment{approved}')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('comment{approved}')): ?>
    <?php echo form_error('comment{approved}', array('class' => 'form-error-msg')) ?>
  <?php endif; ?>

  <?php $value = object_checkbox_tag($comment, 'getApproved', array (
  'control_name' => 'comment[approved]',
)); echo $value ? $value : '&nbsp;' ?>
    </div>
</div>

</fieldset>

<?php include_partial('edit_actions', array('comment' => $comment)) ?>

</form>

<ul class="sf_admin_actions">
      <li class="float-left"><?php if ($comment->getId()): ?>
<?php echo button_to(__('delete'), '@admin?module=comment&action=delete&id='.$comment->getId(), array (
  'post' => true,
  'confirm' => __('Are you sure?'),
  'class' => 'sf_admin_action_delete',
)) ?><?php endif; ?>
</li>
  </ul>
